import React from "react"
import AccountMain from '../components/accountMain'
import Statistics from "../components/statistics"
import Home from '../pages/home'

export interface ComponentsRoute {
    name: string
    path: string
    fullpath: string
    component: React.FC
    children: ComponentsRoute[]
    defaultPath?: boolean   // 是否默认路径,重定向至当前路径
}

export const homeRoutes: ComponentsRoute[] = [
    { 
        name: '账单',
        path: 'account',
        fullpath: '/home/account',
        component: AccountMain,
        children: [],
        defaultPath: true
    }, {
        name: '统计',
        path: 'statistics',
        fullpath: '/home/statistics',
        component: Statistics,
        children: [],
        defaultPath: true
    }
];

export const pageRoutes: ComponentsRoute[] = [
    {
        name: '主页面',
        path: '/home',
        fullpath: '/home',
        component: Home,
        children: homeRoutes,
        defaultPath: true
    }
]